require(estimatr)

######################################################
###Active Reporters, cluster-robust SE
mod.pool.active.clst <- lm_robust(active.ever.feed ~ Responsiveness + recruitment + lc1.announce + Recruited.Phase2, data=ph2.reporters,
                             clusters = location.id)

mod.one.active.clst <- lm_robust(active.ever.feed ~ Responsiveness + recruitment, data=ph2.reporters[ph2.reporters$Recruited.Phase2==0,],
                          clusters = location.id)

mod.two.active.clst <- lm_robust(active.ever.feed ~ Responsiveness + recruitment + lc1.announce, data=ph2.reporters[ph2.reporters$Recruited.Phase2==1,],
                          clusters = location.id)


###############################################################
###Total responses, cluster-robust SE
mod.pool.total.clst <- lm_robust(total.responses.feed ~ Responsiveness + recruitment + lc1.announce + Recruited.Phase2, data=ph2.reporters,
                             clusters = location.id)

mod.one.total.clst <- lm_robust(total.responses.feed ~ Responsiveness + recruitment, data=ph2.reporters[ph2.reporters$Recruited.Phase2==0,],
                          clusters = location.id)

mod.two.total.clst <- lm_robust(total.responses.feed ~ Responsiveness + recruitment + lc1.announce, data=ph2.reporters[ph2.reporters$Recruited.Phase2==1,],
                          clusters = location.id)
